import request from '../network/request'

const Api = {
    mpDoLoginByPhone: 'auth/c/mpDoLoginByPhone',
    getLoginUser: 'auth/c/getLoginUser',
    userData: 'api/biz/user/data',
    myCollectMyPage: 'api/biz/myCollect/myPage',
    myFollowMyPage: 'api/biz/myFollow/myPage',
    myScanMyPage: 'api/biz/myScan/pageApi',
    commonSearch: 'api/biz/common/search',
    twCarouselEnableList: 'api/biz/twCarousel/enableList',
    twCarouselDetail: 'api/biz/twCarousel/detail',
    commonVisitNum: 'api/biz/common/visitNum',
    userUpdateUser: 'client/c/user/updateUser',
}

export const mpDoLoginByPhone=(data) =>{
    return request({
        url: Api.mpDoLoginByPhone,
        method: 'post',
        data: data,
        headers: {contentType: 'application/json;charset=UTF-8',loading:true}
    })
}


export const userUpdateUser=(data) =>{
    return request({
        url: Api.userUpdateUser,
        method: 'post',
        data: data,
        headers: {contentType: 'application/json;charset=UTF-8',loading:true}
    })
}


export const getLoginUser=() =>{
    return request({
        url: Api.getLoginUser,
        method: 'get',
      })
}


export const userData=() =>{
    return request({
        url: Api.userData,
        method: 'get',
      })
}


export const myCollectMyPage=(data) =>{
    return request({
        url: Api.myCollectMyPage,
        data:data,
        method: 'get',
        headers: {contentType:  'application/x-www-form-urlencoded',loading:false}
      })
}


export const myFollowMyPage=(data) =>{
    return request({
        url: Api.myFollowMyPage,
        data:data,
        method: 'get',
        headers: {contentType:  'application/x-www-form-urlencoded',loading:false}
      })
}



export const myScanMyPage=(data) =>{
    return request({
        url: Api.myScanMyPage,
        data:data,
        method: 'get',
        headers: {contentType:  'application/x-www-form-urlencoded',loading:false}
      })
}



export const commonSearch=(data) =>{
    return request({
        url: Api.commonSearch,
        data:data,
        method: 'get',
        headers: {contentType:  'application/x-www-form-urlencoded',loading:false}
      })
}


export const twCarouselEnableList=() =>{
    return request({
        url: Api.twCarouselEnableList,
        method: 'get',
        headers: {contentType:  'application/x-www-form-urlencoded',loading:false}
      })
}



export const twCarouselDetail=(data) =>{
    return request({
        url: Api.twCarouselDetail,
        method: 'get',
        data:data,
        headers: {contentType:  'application/x-www-form-urlencoded',loading:false}
      })
}



export const commonVisitNum=(data) =>{
    return request({
        url: Api.commonVisitNum,
        method: 'get',
        data:data,
        headers: {contentType:  'application/x-www-form-urlencoded',loading:false}
      })
}

